package org.aj.common.web.file.bean;

import javax.validation.constraints.NotBlank;

/**
 * @autor aj
 * description 文件元数据
 * date  2022/1/222:53
 */
public class FileMetadata {

    /**
     * 子文件夹路径
     */
    String subFolderPath;
    /**
     * 文件名称
     */
    @NotBlank(message = "请传入文件名称")
    String fileName;

    /**
     * 是否需要保留原文件的名称
     */
    Boolean needKeepOriginalName;

    /**
     * 上一次获得文件获得的相对路径
     */
    String beforeRelativePath;
    /**
     * 文件对应的字节数组
     */
    byte[] bytes;

    /**
     * 文件类型 例如：对应图片类型 "image/jpeg","image/jpg","image/png"
     */
    String contentType;

    public String getSubFolderPath() {
        return subFolderPath;
    }

    public FileMetadata setSubFolderPath(String subFolderPath) {
        this.subFolderPath = subFolderPath;
        return this;
    }

    public String getFileName() {
        return fileName;
    }

    public FileMetadata setFileName(String fileName) {
        this.fileName = fileName;
        return this;
    }

    public Boolean getNeedKeepOriginalName() {
        return needKeepOriginalName;
    }

    public FileMetadata setNeedKeepOriginalName(Boolean needKeepOriginalName) {
        this.needKeepOriginalName = needKeepOriginalName;
        return this;
    }

    public byte[] getBytes() {
        return bytes;
    }

    public FileMetadata setBytes(byte[] bytes) {
        this.bytes = bytes;
        return this;
    }

    public String getContentType() {
        return contentType;
    }

    public FileMetadata setContentType(String contentType) {
        this.contentType = contentType;
        return this;
    }

    public String getBeforeRelativePath() {
        return beforeRelativePath;
    }

    public FileMetadata setBeforeRelativePath(String beforeRelativePath) {
        this.beforeRelativePath = beforeRelativePath;
        return this;
    }
}
